package cn.tedu.homew.secondWork;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestWork2 {
    @Test
    public void test0001()
    {
        //作业二
        //产生错误的自动注入 ByType
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        Demo1 demo1=(Demo1) applicationContext.getBean("demo1");
        System.out.println(demo1);
        ((ClassPathXmlApplicationContext)applicationContext).close();;
    }
}
